//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-

extends layout

block content
  //- Conditions for this page:
    // - already linked

  div.container

    h1 Unlink #{user.azure.username} and #{user.github.username} (GitHub)?
    p.lead Sorry to see you go.

    if organizations && organizations.length
      - var unlinkText = 'Unlink anyway'
      p Before you leave, you're currently a member of the following #{config.brand.companyName} organization#{organizations.length == 1 ? '' : 's'} on GitHub:
      ul
        each organization in organizations
          li= organization.name

      p Unlinking your accounts will remove you from all of the organizations listed above and <strong>may result in data loss</strong>.

      ul
        li Your GitHub account, #{user.github.username}, will lose privileged access to these organizations.
        li Private forks of repos from these organizations, if any, will be removed by GitHub.
        li Work committed in a private fork of these org's repos will be lost.

    else
      - var unlinkText = 'Unlink'
      p You are not in any #{config.brand.companyName} organizations, so nothing should change in your GitHub experience.

    p &nbsp;

    form(method='post')
      p
        input.btn.btn-lg.btn-danger(type='submit', value=unlinkText)
        | &nbsp; &nbsp; &nbsp;
        a.btn.btn-lg.btn-default(href='/') Cancel
